// run: $exec < input
#include <iostream>
#include <vector>
#include <queue>

struct data { int a, b; };
bool operator<(data const & a, data const & b)
{
	return a.b > b.b;
}

int const maxn = 100007;
data a[maxn];
long long n, r, avg;

int main()
{
	std::ios::sync_with_stdio(false);
	std::cin >> n >> r >> avg;
	avg *= n;
	std::priority_queue<data> pq;
	long long sum = 0;
	for (int i = 0; i < n; i++) {
		std::cin >> a[i].a >> a[i].b;
		pq.push(a[i]);
		sum += a[i].a;
	}

	long long ans = 0;
	sum = avg - sum;
	for ( ; sum > 0; ) {
		data now = pq.top(); pq.pop();
		long long tmp = std::min(sum, r - now.a);
		sum -= tmp;
		ans += tmp * now.b;
	}
	std::cout << ans << "\n";
}

